package com.black.app.domain.req.store.query;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@ApiModel(value = "AppStoreAddressesQueryReq", description = "APP端-地址查询请求对象")
@Getter
@Setter
public class AppStoreAddressesQueryReq extends PageAbstructReq {

    /**
     * 收货人姓名
     */
    @ApiModelProperty(value = "收货人姓名")
    private String recipientName;

    /**
     * 收货人电话
     */
    @ApiModelProperty(value = "收货人电话")
    private String phoneNumber;

    /**
     * 省级名称
     */
    @ApiModelProperty(value = "省级名称")
    private String provinceName;

    /**
     * 市级名称
     */
    @ApiModelProperty(value = "市级名称")
    private String cityName;

    /**
     * 区级名称
     */
    @ApiModelProperty(value = "区级名称")
    private String districtName;

    /**
     * 性别（0：女，1：男）
     */
    @ApiModelProperty(value = "性别（0：女，1：男）")
    private String recipientSex;

    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细地址")
    private String detailAddress;


    @ApiModelProperty(value = "开始时间")
    private String beginTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;


    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
